﻿using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Runtime.Serialization;
using System.Text;

namespace JieKou.Modbus
{
    public class ParameterRTU:ParameterTCP
    {
        ///modbus-rtu///////////////////////////
        /// <summary>
        /// 端口名称：eg. COM1、COM2 ……
        /// 不用串口时，这个别赋值。
        /// </summary>
        private string _serialPortName = null;
        /// <summary>
        /// 波特率：
        /// </summary>
        private int _baudRate = 9600;
        /// <summary>
        /// 校验位
        /// </summary>
        private string _parity = "Even";
        /// <summary>
        /// 停止位
        /// </summary>
        private string _stopBits = "One";

        //////////////////////////////
        /// <summary>
        /// 串口名称：eg. COM1、COM2 ……
        /// </summary>
        public string SerialPortName { get => _serialPortName; set => _serialPortName = value; }
        /// <summary>
        /// 波特率：
        /// </summary>
        public int BaudRate { get => _baudRate; set => _baudRate = value; }
        /// <summary>
        /// 校验位
        /// </summary>
        public string Parity { get => _parity; set => _parity = value; }
        /// <summary>
        /// 停止位
        /// </summary>
        public string StopBits { get => _stopBits; set => _stopBits = value; }
    }
}
